Author Topic: why colored opengl quads behaves differently in virtual machines?  (Read 580 times)

0 Members and 1 Guest are viewing this topic.

Offline ViL

  • Avocado lover 🥑
  • C= 64
  • **
  • Posts: 52
  • Karma: 1
    • View Profile
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
https://i.imgur.com/tH2BCZI.png

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 in 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
https://pastebin.com/raw/4HFziKWv

thanks beforehand! :D
« Last Edit: June 30, 2018 by ViL »

Offline Siekmanski

  • ZX 81
  • *
  • Posts: 8
  • Karma: 3
    • View Profile
Hi ViL,

A while ago I wrote an example for my little nephew.
He wanted to experiment with OpenGL and Masm.
Wrote some basic routine in one program.
Switching 2D and 3D mode, rotated cube with textures ( transparent color can be set, jpg gif bmp can be loaded from disk and resource section )
Background picture, transparent Bitmap font and a simple line draw function.
Some lables are in Dutch.....

Franck Charlet "Hitchhikr" wrote a lot of very cool OpenGL examples in Masm. http://perso.orange.fr/franck.charlet/Ogl_Asm.zip

Offline ViL

  • Avocado lover 🥑
  • C= 64
  • **
  • Posts: 52
  • Karma: 1
    • View Profile
hii, Siekmanski! :) your example is awesome! x3 and Hitchkikr one is very useful too!, thanks a lot for sharing them! :D

i'm already happy about having opened this thread lol through i'm still very puzzled about not having found anyone ever explaining nor even talking about what happens to gouraud shade colors in quads on virtual machines, any idea is very appreciated too! x3
« Last Edit: July 01, 2018 by ViL »

Offline Siekmanski

  • ZX 81
  • *
  • Posts: 8
  • Karma: 3
    • View Profile
About the gouraud shade colors in quads on virtual machines, I have no idea.

Offline nuclear

  • Graphics hacker
  • C= 64
  • **
  • Posts: 27
  • Karma: 38
    • View Profile
    • Personal website
The OpenGL implementation is free to split quads into triangles any way it prefers, or not split them at all if it supports directly rasterizing quads. In this case your VM's OpenGL implementation happens to choose to split your quads in a different way than your native graphics card driver. If you want consistent results across different implementations, stick to triangles.
Nuclear / Mindlapse & The Lab
Challenge Trophies Won: