Jump to content
Tuts 4 You
ViL

why colored opengl quads behaves differently in virtual machines?

Recommended Posts

ViL
Posted (edited)

i was testing quads using multiple colors (gouraud-shade) and for some reason virtual machines either inverts the quad colors or vertex order

here's a screenshot

i did a test using the same exe in my host and guest virtual machine, at the left of their screen they are all three triangles, both quads at the right

also enumerated the vertex order in which they are drawn in the image, you can notice the quads color or vertex are inverted on the virtual machine

i tested on VMware and a friend also tested on VirtualBox, the result is the same on both, may i ask why this happens?

attached the exe and source, the assembly source is here if that's better

thanks beforehand! :D

masm32-vm-color-test.zip

Edited by ViL (see edit history)

Share this post


Link to post
Share on other sites
Kurapica
Posted (edited)

Which version of openGL do you have on the host ?

Which version of openGL do you have on the guest ?

Is the guest using software acceleration for openGL ?

I advise you to avoid using quads, they are going to be deprecated in openGL version 3.0 or higher.

More info here : https://stackoverflow.com/questions/6644099/what-is-so-bad-about-gl-quads

stick to triangle strips

Edited by Kurapica (see edit history)

Share this post


Link to post
Share on other sites
ViL

helloo, Kurapica! :) first of all thanks a lot for the reply! x3 also they should technically be exactly the same since it's the same Os version on both

i can't tell for sure if it's turned on or off either on the host nor guest, the option to see seems is turned off on both; the intel hd graphics options doesn't say anything about it either, but i assume it's the same on  both

Z76mUwH.png

all that is done on the exe should be supported from at least opengl 1.1 too, though

a friend also tested on her virtual os having an NVidia card, and it's also displayed inverted on virtual machine

also thanks for the insight! :D yea, i'll use just triangles from now on, since it also workaround this, though i was curious about the reason behind this could happen, given it seemingly just happens on virtual machines

Share this post


Link to post
Share on other sites
Kurapica

The drivers usually have a deep impact in how openGL draws stuff, so I assume you are using a native hardware

acceleration on your host, the guest usually uses software acceleration or at least something different from host, so results may differ.

but all in all, stick to triangles for more compatibility.

  • Like 1

Share this post


Link to post
Share on other sites
ViL

i'm happy with your answer, thaanks a lot, Kurapica! :D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×