GPU Compute Software
Ask questions about Intel® Graphics Compute software technologies, such as OpenCL* GPU driver and oneAPI Level Zero
153 Discussions

I got strange hit value by glRenderMode(GL_RENDER); on OpenGL

KatsuyaIdo
Novice
2,168 Views

We released graphics software used opengl, and we found failed result when used selection buffer.

The reason is we draw same position line.

Is it intel graphics bug?

When I used Geforce RTX 3070 Ti, I can get true value.

I attachment my graphics card info and souce code.

 

 

 

#include "stdafx.h"
#define LFW_INCLUDE_NONE
#include <Windows.h> 
#include <gl\GL.h>
#include <gl\GLU.h>
#include "glfw\include\GLFW\glfw3.h"
#include "glfw\glut.h"
 
#include <stdlib.h>
#include <stdio.h>
 
bool g_bad_value = true;
void MouseButtonCallback(GLFWwindow* window, int button, int action, int mods) {
 
float current_aspect = 0;           
GLuint selectBuf[1024];             
GLuint hits;                        
GLint viewport[4];                  
 
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glClearColor(0.7, 0.7, 0.7, 1.0);
glGetIntegerv(GL_VIEWPORT, viewport);
glSelectBuffer(1024, selectBuf);     
(void)glRenderMode(GL_SELECT);       
glInitNames();                       
glPushName(0);
glMatrixMode(GL_PROJECTION);         
glLoadIdentity();
gluPickMatrix(240, 240, 1.0, 1.0, viewport);
glMatrixMode(GL_MODELVIEW);     
glLoadIdentity();
for (int i = 0; i < 10; i++)
{
glLoadName(i);
glBegin(GL_LINES);
 
// pick point is (0,0) so, the line provided  0 hit value.
// but, I got 10 hit value.
if(g_bad_value) 
{
glVertex3d(-0.8, -0.8, 0);
glVertex3d(-0.8, -0.8, 0);
}
else
{
// this is good 0 hit value.
glVertex3d(-0.7, -0.7, 0);
glVertex3d(-0.8, -0.8, 0);
}
 
glEnd();
 
}
hits = glRenderMode(GL_RENDER);
printf("%d\n", hits);
}
int main(void)
{
GLFWwindow* window;
 
if (!glfwInit())
exit(EXIT_FAILURE);
 
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
 
window = glfwCreateWindow(480, 480, "Simple example", NULL, NULL);
if (!window)
{
glfwTerminate();
exit(EXIT_FAILURE);
}
 
glfwSetMouseButtonCallback(window, MouseButtonCallback);
glfwMakeContextCurrent(window);
glfwSwapInterval(1);
 
while (!glfwWindowShouldClose(window))
{
 
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glClearColor(0.7, 0.7, 0.7, 1.0);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glMatrixMode(GL_MODELVIEW_MATRIX);
glLoadIdentity();
glColor3d(1, 0, 0);
glBegin(GL_LINES);
if (g_bad_value)
{
glVertex3d(-0.8, -0.8, 0);
glVertex3d(-0.8, -0.8, 0);
}
else
{
glVertex3d(-0.7, -0.7, 0);
glVertex3d(-0.8, -0.8, 0);
}
 
glEnd();
glfwSwapBuffers(window);
glfwPollEvents();
}
 
glfwDestroyWindow(window);
 
glfwTerminate();
exit(EXIT_SUCCESS);
}
Labels (1)
0 Kudos
6 Replies
DeividA_Intel
Employee
2,090 Views

Hello KatsuyaIdo,    


Thank you for posting on the Intel® communities. I understand you are having an issue with the Intel graphics and OpenGL, to have a better view of this issue I would like to confirm the following:


1. Are you working for a company or is this for a personal matter?

2. If you are working for a company, what is the name of the company you work for?

3. Are you working on a project? Can you provide more details about this project and your issue?

4. Run the Intel® System Support Utility (Intel® SSU) to gather more details about the system.  


Best regards, 

Deivid A.  

Intel Customer Support Technician 


KatsuyaIdo
Novice
2,077 Views

Hi David.

Thank you your answer.

1. Are you working for a company or is this for a personal matter?

=> I'm working for a company.

2. If you are working for a company, what is the name of the company you work for?

=> Lattice Technology.

3. Are you working on a project? Can you provide more details about this project and your issue?

=> When we rendered same vertex line, we always got pick result by glRenderer(GL_RENDER);

=> But, the pick result must 0.

The detail is first post source code.

4. Run the Intel® System Support Utility (Intel® SSU) to gather more details about the system.  

I attachment Intel support log.

0 Kudos
DeividA_Intel
Employee
2,054 Views

Hello KatsuyaIdo, 


Thanks for the information provided. I would like to investigate more about this issue and to continue I will need the following:


1. Please provide the exact steps to replicate this issue. If possible, take a video replicating the issue.

2. Provide a link and/or access to the tool that is giving you issues.

3. Just to confirm, are you using the Clevo NS50MU 15.6-inch Linux Ultrabook?


Regards,  

Deivid A. 

Intel Customer Support Technician


0 Kudos
KatsuyaIdo
Novice
2,035 Views

Hi David.

Thank you for your reply.

 

1. Please provide the exact steps to replicate this issue. If possible, take a video replicating the issue.

2. Provide a link and/or access to the tool that is giving you issues.

I attachment video and my source code.

 

3. Just to confirm, are you using the Clevo NS50MU 15.6-inch Linux Ultrabook?

No. I attachment my os version.

 

When I update Intel Graphics, I got bug.

Not Bug : Intel Iris Xe Graphics G7 96EU(31.0.101.4091)

Occurrence Bug: Intel Iris Xe Graphics G7 96EU(31.0.101.4672)

 

Regards,  

Katsuya Ido

 

0 Kudos
DeividA_Intel
Employee
2,013 Views

Hello KatsuyaIdo,  


Thank you for the information provided 


I will proceed to check the issue internally and post back soon with more details.  


Best regards, 

Deivid A.  

Intel Customer Support Technician 


DeividA_Intel
Employee
1,875 Views

Hello KatsuyaIdo, 


Thanks for your patience. I would like to let you know that we have a specific forum for this kind of issue and product, it is called the Intel Developer Zone. There you will receive the appropriate support on this and other concerns you may have related to this product.  Also, you might want to check the OpenGL community for more exact information regarding your issue.


Here you will find the links to access the website and the community forums:  



Please keep in mind that this thread will no longer be monitored by Intel.  


Regards,   

Deivid A.  

Intel Customer Support Technician  


0 Kudos
Reply