Thread Tools Display Modes
02-08-18, 05:55 PM   #1
corveroth
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Apr 2006
Posts: 29
UI stops drawing - processing limit/timeout?

EDIT: Further fiddling and I've gotten things working, but now I have new questions.

I'm building a grid of pixels, as below. However, if I increase either xsize or ysize to 128, my UI vanishes immediately upon loading in (as if I'd hit Alt-Z to hide the interface, but there seems to be no way to recover). I can alternately avoid this and increase the limits up to 256x256 by commenting out line 16 so that I'm not setting any textures. (Higher limits cause the game to stall for a very long time just loading in.)

Is there some processing limit I'm unaware of?

Lua Code:
  1. Grid = CreateFrame("Frame", "GridFrame", UIParent)
  2. Grid.pixels = {}
  3. Grid:SetPoint("CENTER")
  4.  
  5. local xsize, ysize = 127, 127
  6.  
  7. function MakeGrid()
  8.     Grid:SetSize(xsize, ysize)
  9.     for row = 1, ysize do
  10.         if not Grid.pixels[row] then Grid.pixels[row] = {} end
  11.        
  12.         for column = 1, xsize do
  13.             local t = Grid:CreateTexture()
  14.             t:SetPoint("TOPLEFT", Grid, "TOPLEFT", (row-1), -(column-1))
  15.             t:SetPoint("BOTTOMRIGHT", Grid, "TOPLEFT", row, -column)
  16.             t:SetColorTexture(random(), random(), random(), 1)
  17.             Grid.pixels[row][column] = t
  18.         end
  19.     end
  20. end
  21.  
  22. MakeGrid()

Last edited by corveroth : 02-08-18 at 09:27 PM.
  Reply With Quote
02-09-18, 10:44 PM   #2
dssd
A Fallenroot Satyr
Join Date: May 2016
Posts: 25
I'd guess that you're hitting the vertex or index buffer limit. SetColorTexture will create a texture of that color and would prevent render batching. Instead use SetColorTexture(1, 1, 1, 1) to create a white texture and then use :SetVertexColor to tint them. That should allow everything to be batched.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » UI stops drawing - processing limit/timeout?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off